<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        .box1{
            width: 100px;
            height: 100px;
            background-color: red;
        }

        .box2{
            width: 100px;
            height: 100px;
            background-color: green;
        }

        .box3{
            width: 100px;
            height: 100px;
            background-color: blue;
        }

        
        .box4{
            width: 100px;
            height: 100px;
            background-color: #ff00f0;
        }

        .box5{
            width: 100px;
            height: 100px;
            background-color: #f0f100;
        }
    </style>
</head>
<body>
    <button id="btn1">单击</button>
    <button id="btn2">双击</button>

    <button id="btn3">鼠标按下</button>
    <button id="btn4">鼠标抬起</button>
    <div id="btn5" class="box1"></div>
    <div id="btn6" class="box2"></div>
    <div id="btn7" class="box3"></div>
    <script>
        var btn1=document.getElementById("btn1");
        var btn2=document.getElementById("btn2");
        var btn3=document.getElementById("btn3");
        var btn4=document.getElementById("btn4");
        var btn5=document.getElementById("btn5");
        var btn6=document.getElementById("btn6");
        var btn7=document.getElementById("btn7");
        var btn8=document.getElementById("btn8");
        var btn9=document.getElementById("btn9");

        btn1.onclick=function(){
            console.log("单击事件");
            
        }

        btn2.ondblclick=function(){
            console.log("双击事件");
        }

        btn3.onmousedown=function(){
            console.log("鼠标按下");
        }

        btn4.onmouseup=function(){
            console.log("鼠标抬起");
        }

        btn5.onmousemove=function(){
           console.log("鼠标移动了");
        }

        btn6.onmouseenter=function(){
         console.log("鼠标进入了")
        }

        btn7.onmouseleave=function(){
         console.log("鼠标离开了")
        }

        btn8.onmouseover=function(){
         console.log("鼠标进入了")
        }

        btn9.onmouseout=function(){
         console.log("鼠标离开了")
        }
    </script>
</body>
</html>